1. Field of the Invention
The invention relates to image processing apparatus and method for performing a compressing process to an image and a storage medium which stores a program for such an image processing method.
2. Related Background Art
Hitherto, a film screen system comprising a combination of an intensifying screen and an X-ray photograph film is often used in X-ray photography for the purpose of a medical diagnosis. According to such a method, an X-ray passing through an object includes internal information of the object, it is converted into a visible light that is proportional to an intensity of the X-ray by the intensifying screen, and the X-ray photograph film is photosensed, thereby forming an X-ray image onto the film.
In recent years, the use of an X-ray digital photographing apparatus for converting an X-ray into a visible light that is proportional to an intensity of the X-ray by a fluorescent material, converting it into an electric signal by using a photoelectric converting element, and converting it into a digital signal by an A/D converter has been started.
In such an X-ray digital photographing apparatus, since the photographed image is a digital image, the collected images can be subjected to an image compression by a discrete cosine transformation that is typical as a JPEG compression or various image compressions by a wavelet transformation and the like.
According to an instruction of FDA of the Government of U.S.A., when the image compression is performed, rough compression ratios have to be embedded as a bit map in the collected images.
Since the compression ratio of the image compression generally fluctuates depending on the kind of image, however, a degree of the compression ratio cannot be known before the image compression is performed but can be known only after the image compression.
As mentioned above, hitherto, since the degree of the compression ratio of the image cannot be previously known, it is difficult to embed the information of the compression ratio into the compressed image.
The invention is made to solve the above problems and it is an object of the invention to obtain compression image data in which a compression ratio has been recorded.
To accomplish the above object, according to a preferred embodiment of the invention, there is provided an image processing apparatus comprising:
a first compressing unit for compressing by using an input image;
a calculating unit for calculating a compression ratio relative to the input image on the basis of a result of the compression by the first compressing unit;
an embedding unit for embedding information showing the calculated compression ratio into the input image; and
a second compressing unit for compressing the input image in which the information showing the compression ratio has been embedded by the embedding unit.
Another object of the invention is to perform a control in consideration of a fluctuation of the compression ratio which is caused by embedding the information regarding the compression ratio into the compression image data when the compression image data is obtained.
To accomplish the above object, according to a preferred embodiment of the invention, there is provided an image processing apparatus comprising:
a first compressing unit for compressing an input image under a predetermined compressing condition;
a calculating unit for calculating a compression ratio relative to the input image on the basis of a result of the compression by the first compressing unit;
a changing unit for changing a value of the calculated compression ratio on the basis of a predetermined reference;
an embedding unit for embedding information showing the compression ratio changed by the changing unit into the input image; and
a second compressing unit for compressing the input image in which the information has been embedded by the embedding unit under the predetermined compressing condition.